package com.md.api.entity.util;

import lombok.AccessLevel;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.FieldDefaults;
import org.springframework.util.CollectionUtils;

import java.util.ArrayList;
import java.util.List;

@Getter
@Setter
@FieldDefaults(level=AccessLevel.PRIVATE)
public class OssPage extends Entity {

	/**
	 * 序列化版本标示
	 */
	private static final long serialVersionUID = 1L;


	String prefix;

	// 标记位
	String marker;

	String nextMarker;
	// 单页最大行数
	Integer limit;

	List<OSSObject> list;


	public void setData(List<OSSObject> data) {
		this.list = data;
	}


	public List<OSSObject> getList() {
		if(CollectionUtils.isEmpty(this.list)){
			this.list = new ArrayList<>();
		}
		return list;
	}
}
